<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
<TITLE>About structures</TITLE>
<style>@import url(coUA.css);</style>
<link disabled rel="stylesheet" href="htmlhelp.css">
</head>

<BODY class="refs">

<h1>About structures</h1>

<p>The HTML Help API provides several objects that you work with using data structures.</p>

<p>When working with a structure, it is recommended that you use a Win32 function such as <b>ZeroMemory</b>, <b>memcpy</b>, or <b>memset</b> to clear out the address space of a structure that has been declared. This ensures that you start with a known quantity before making any modifications. 

For example, the following code fragment uses <b>memset</b> to make a copy of an <a href="str_hh_wintype.htm">HH_WINTYPE</a> structure:

<p><pre><code>
<br>HH_WINTYPE hhWinType;                   //Create new wintype.
<br>           HH_WINTYPE *phhWinType;      //Create a pointer to this wintype.
<br>           memset(phhWinType,           //Requires "memory.h" header be included in the calling application.
<br>                  0,
<br>                  sizeof(HH_WINTYPE)); 
<br>           HtmlHelp(hwnd,
<br>                    "c:\\help\\MyHelpFile.chm>main",
<br>                    HH_GET_WIN_TYPE,
<br>                    (DWORD)&phhWinType);
<br>           hhWinType = *phhWinType;    //Create a copy so we don't write directly.
</pre></code></p>

<h3>Note</h3>
<ul>
<li>The Win32 functions such as <b>ZeroMemory</b>,<b>memcpy</b>, or <b>memset</b> do not make a deep copy of the structure. Developer-written copy constructors perform proper deep copies for OOP/C++ classes and objects.
</li>
</ul>

<h2>Structures quick reference</h2>

<table border=1 cellpadding=3 cellspacing=0 width=100%>
<TR VALIGN="top">
<TH><I>Category</I></TH>
<TH><I>Structure</I></TH>
</TR>

<TR VALIGN="top">
<TD>
<h3>Window types</h3>
</TD>
<TD>
<ul>
<li><a href="str_hh_popup.htm">HH_POPUP</a></li>
<li><p><a href="str_hh_wintype.htm">HH_WINTYPE</a></li>
</ul>
</TD>
</TR>


<TR VALIGN="top">
<TD>
<h3>ALink name/KLink keyword lookups</h3>
</TD>
<TD>
<ul>
<li><a href="str_hh_aklink.htm">HH_AKLINK</a>
</ul>
</TD>
</TR>


<TR VALIGN="top">
<TD>
<h3>Notification messages</h3>
</TD>
<TD>
<ul>
<li><a href="str_hhnnotify.htm">HHN_NOTIFY </a></li>
<li><a href="str_hhntrack.htm">HHNTRACK</a></li>
</ul>
</TD>
</TR>

<TR VALIGN="top">
<TD>
<h3>Full-text search</h3>
</TD>
<TD>
<ul>
<li><a href="str_hh_fts_query.htm">HH_FTS_QUERY</a></li>
</ul>
</TD>
</TR>

<TR VALIGN="top">
<TD>
<h3>Error tracking</h3>
</TD>
<TD>
<ul>
<li><a href="str_hh_last_error.htm">HH_LAST_ERROR</a></li>
</ul>
</TD>
</TR>
</TABLE>

<br>
<table border="0" cellpadding="0" cellspacing="4">
<tr>
<td valign="top"><a href="ov_html_help_api_overview.htm"><img src="home.gif" width=20 height=18 alt="link to overview topic" border="0"></a>
</td>
<td><a href="ov_html_help_api_overview.htm">About the HTML Help API</A>
</td>
</tr>
<tr>
<td>&nbsp;
</td>
</tr>
</table>


<!--start keywords-->



</BODY>
</HTML>
